package org.gd.hellojavacore;

public class Foo {
    private static Foo instance = new Foo();
    private static final int DELTA = 6;
    private static int BASE = 7;
    private int x;

    private Foo() {
        System.out.println("\nin constructor");
        System.out.printf("BASE  : %s\n", BASE);
        System.out.printf("DELTA : %s\n", DELTA);
        x = BASE + DELTA;
    }

    public static void main(String... args) {
        System.out.print("\nin public static void main\n");
        System.out.printf("Foo.instance.x : %d\n", Foo.instance.x);
        System.out.printf("BASE  : %s\n", BASE);
        System.out.printf("DELTA : %s\n", DELTA);

        System.out.println("o_O");
    }
}
